windows: normalize drive letters fixes #9279#9313
windows: normalize drive letters fixes #9279#9313ThomasWaldmann merged 1 commit intoborgbackup:masterfrom
Conversation
|
@ThomasWaldmann I verified map_chars with test_windows_paths.py it correctly maps special characters like |
|
Thanks for the PR! I see some formatting changes - are you using the black version as specified in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9313 +/- ##
=======================================
Coverage 75.92% 75.93%
=======================================
Files 86 86
Lines 14777 14780 +3
Branches 2201 2202 +1
=======================================
+ Hits 11220 11223 +3
Misses 2880 2880
Partials 677 677 ☔ View full report in Codecov by Sentry. |
8a62fd8 to
bbe2a22
Compare
|
@ThomasWaldmann Yes, sorry about that! |
adb91e7 to
53266d5
Compare
8e03551 to
5f7a0c8
Compare
|
Please also do some manual tests on windows, using borg create, list, extract. Use different absolute paths, use different drive letters (current drive, other drive). |
491d9eb to
189fe68
Compare
189fe68 to
6430564
Compare
|
Did some manual testing: Test 1:
|
|
That is a bit unusual, but guess it is not due to your changes in this PR: So is /tmp a symlink to /msys64/tmp? Maybe file an issue for this, guess this should be C/tmp/... in the archive. |
|
OK, merge? |
Ill check this out right now and open an issue |
|
Thanks! |
Implemented drive letter normalization in make_path_safe within src/borg/helpers/fs.py.
Windows drive letters (e.g.
C:\path) are now mapped to portable path components (e.g.C/path) to ensure cross-platform compatibility and correct archiving.Added regression test test_make_path_safe_win32_drive_letters to src/borg/testsuite/helpers/fs_test.py covering various drive letter scenarios.
Verified locally on Windows with MSYS2. Fixes #9279